package A11;

import java.util.Calendar;

//优良品质马类

public class Thoroughbred {
    private Thoroughbred mother;
    private Thoroughbred father;
    private int birthyear;

    public Thoroughbred(Thoroughbred mother, Thoroughbred father, int birthyear) {
        this.mother = mother;
        this.father = father;
        this.birthyear = birthyear;
    }

    public int getCurrentAge() {
        Calendar calendar = Calendar.getInstance();
        int currentYear = calendar.get(Calendar.YEAR);
        return currentYear - birthyear;
    }


    public Thoroughbred getFather() {
        return father;
    }

    public Thoroughbred getMother() {
        return mother;
    }

    public void setMother(Thoroughbred mother) {
        this.mother = mother;
    }

    public void setFather(Thoroughbred father) {
        this.father = father;
    }

    public void setBirthyear(int birthyear) {
        this.birthyear = birthyear;
    }
}
